#! /bin/bash
total=30
a=24;
b=24;
for exe in 1d-heat
do
    #rm ./$exe-16384.txt 
    rm ./$exe.txt
    for i in `seq 5 5 200`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 210 10 400`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 420 20 1420`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 1500 80 5500`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 6000 500 12000`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 13000 1000 30000`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 30000 10000 300000`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
    for i in `seq 400000 100000 1000000`;
    do
        ../$exe/exe-$exe $i 4000 >> ./$exe.txt 
        echo  $i >> ./1d-heat.nlist
    done
done


echo -e "n\tGStencils" > ./1d-heat.data.txt
cat ./1d-heat.txt |awk -F "= " '{print $NF}'| paste 1d-heat.nlist -  | awk '{print $1 "\t" $2 }' >>  ./1d-heat.data.txt
rm ./1d-heat.nlist
rm ./1d-heat.txt